<template>
    <div class="module-wrap">
      <div v-if="title" class="module-title">
        <span class="point"></span>
        {{ title }}
      </div>
      <div class="module-content">
        <slot></slot>
      </div>
    </div>
</template>
  
<script setup lang='ts'>
const {title} = defineProps(['title'])
</script>
  
<style lang="scss">
  .module-wrap{
    width: 100%;
    .module-title{
      display: flex;
      align-items: center;
      color: #fff;
      height: 20px;
      line-height: 20px;
      padding: 10px;
      box-shadow: 0 0 12px rgba(255, 255, 255, .12) inset;
      border: 1px solid #ffffff4d;
      border-bottom: none;
      .point{
        display: inline-block;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #19C8F2;
        margin-right: 10px;
      }
    }
    .module-content{
      box-shadow: 0 0 12px rgba(255, 255, 255, .12) inset;
      border: 1px solid #ffffff4d;
      padding: 5px;
      height: 100%;
      box-sizing: border-box;
      &.has-title{
        height: calc(100% - 50px);
      }
    }
  }
</style>